<%@ page contentType="text/html; charset=UTF-8"

         pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://"
            + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>
<!DOCTYPE html>
<html lang="en">
<head>
    <base href="<%=basePath%>">
    <!-- jsp文件头和头部 -->
    <%@ include file="../../system/admin/top.jsp" %>
</head>
<body>

<div class="container-fluid" id="main-container">

    <div id="page-content" class="clearfix">

        <div class="row-fluid">

            <div class="row-fluid">

                <!-- 检索  -->
                <form action="transaction/list.do" method="post" name="Form" id="Form">
                    <table>
                        <tr>
                            <td><span class="input-icon"> <input
                                    autocomplete="off" id="nav-search-input" type="text"
                                    name="owner" id="owner" value="${owner}"
                                    placeholder="输入条件：所有者"/> <i id="nav-search-icon"
                                                                class="icon-search"></i> </span>
                            </td>
                            <td><span class="input-icon"> <input
                                    autocomplete="off" id="nav-search-input" type="text"
                                    name="searchKey" id="searchKey" value="${searchKey}" placeholder="输入条件：关键词"/>
										<i id="nav-search-icon" class="icon-search"></i> </span></td>

                            <td style="vertical-align:top;">
                                <button
                                        class="btn btn-mini btn-light" onclick="search();" title="检索">
                                    <i id="nav-search-icon" class="icon-search"></i>
                                </button>
                            </td>
                        </tr>
                    </table>
                    <!-- 检索  -->


                    <table id="table_report"
                           class="table table-striped table-bordered table-hover">

                        <thead>
                        <tr>
                            <th class="center">序号</th>
                            <th class="center">订单号(16位)</th>
                            <th class="center">交易类型</th>
                            <th class="center">金额</th>
                            <th class="center">状态</th>
                            <th class="center">帐号</th>
                            <th class="center">创建时间</th>
                            <th class="center">成功时间</th>
                        </tr>
                        </thead>

                        <tbody>

                        <!-- 开始循环 -->
                        <c:choose>
                            <c:when test="${not empty varList}">
                                <%--<c:if test="${QX.cha == 1 }">--%>
                                <c:forEach items="${varList}" var="var" varStatus="vs">
                                    <tr>
                                        <td class='center' style="width: 30px;">${vs.index+1}</td>
                                        <td>${fn:substring(var.recordm, 0,16)}</td>
                                        <td>${var.typeStr}</td>
                                        <td>${var.fee}</td>
                                        <td>${var.statusStr}</td>
                                        <td>${var.userId}</td>
                                        <td>${var.createTimeStr}</td>
                                        <td>${var.payTimeStr}</td>
                                    </tr>

                                </c:forEach>
                                <%--</c:if>--%>
                                <%--<c:if test="${QX.cha == 0 }">--%>
                                <%--<tr>--%>
                                <%--<td colspan="8" class="center">您无权查看</td>--%>
                                <%--</tr>--%>
                                <%--</c:if>--%>
                            </c:when>
                            <c:otherwise>
                                <tr class="main_info">
                                    <td colspan="8" class="center">没有相关数据</td>
                                </tr>
                            </c:otherwise>
                        </c:choose>


                        </tbody>
                    </table>

                    <div class="page-header position-relative">
                        <table style="width:100%;">
                            <tr>
                                <td style="vertical-align:top;">
                                    <div class="pagination"
                                         style="float: right;padding-top: 0px;margin-top: 0px;">${page.getPageStr()}</div>
                                </td>
                            </tr>
                        </table>
                    </div>
                </form>
            </div>


            <!-- PAGE CONTENT ENDS HERE -->
        </div>
        <!--/row-->

    </div>
    <!--/#page-content-->
</div>
<!--/.fluid-container#main-container-->

<!-- 返回顶部  -->
<a href="#" id="btn-scroll-up" class="btn btn-small btn-inverse"> <i
        class="icon-double-angle-up icon-only"></i> </a>

<!-- 引入 -->
<script type="text/javascript">window.jQuery || document.write("<script src='static/js/jquery-1.9.1.min.js'>\x3C/script>");</script>
<script src="static/js/bootstrap.min.js"></script>
<script src="static/js/ace-elements.min.js"></script>
<script src="static/js/ace.min.js"></script>

<script type="text/javascript" src="static/js/chosen.jquery.min.js"></script>
<!-- 下拉框 -->
<script type="text/javascript"
        src="static/js/bootstrap-datepicker.min.js"></script>
<!-- 日期框 -->
<script type="text/javascript" src="static/js/bootbox.min.js"></script>
<!-- 确认窗口 -->
<!-- 引入 -->
<script type="text/javascript" src="static/js/jquery.tips.js"></script>
<!--提示框-->
<script type="text/javascript">

    $(top.hangge());

    //检索
    function search() {
        top.jzts();
        $("#Form").submit();
    }
</script>

<script type="text/javascript">

    $(function () {

        //下拉框
        $(".chzn-select").chosen();
        $(".chzn-select-deselect").chosen({allow_single_deselect: true});

        //日期框
        $('.date-picker').datepicker();

    });

    //导出excel
    function toExcel() {
        window.location.href = '<%=basePath%>bill/excel.do';
    }
</script>

</body>
</html>

